Core
A flexible modern core js plugin.
Introduction
Installation
NPM
npm i @pluginjs/pluginjs
Yarn
yarn add @pluginjs/pluginjs
Dependencies
Getting Started
Include
Webpack && Rollup:
ECMAScript Modules
import core from "@pluginjs/pluginjs"
CommonJS
require("@pluginjs/pluginjs")
CDN:
Development:
<script src="/path/to/core.js"></script>
<link rel="stylesheet" href="/path/to/core.css">
Production:
<script src="/path/to/core.min.js"></script>
<link rel="stylesheet" href="/path/to/core.min.css">
Initialize
HTML:
<body>
<div class="element"></div>
</body>
JS:
Pj.Core('.element', options);
$('.element').plugin('Core', options);
API
Methods:
Methods are called on core instances through the core method itself.
You can also save the instances to variable for further use.
Name | Description |
---|
"themeable" | Make plugin themeable |
"styleable" | Make plugin styleable |
"eventable" | Make plugin eventable |
"stateable" | Make plugin stateable |
"register" | Register plugin to core |
"translateable" | Make plugin translateable |
example:
$core.plugin('Core', register)
$core.plugin('Core', register, "foo")
$core.plugin('Core', register, "foo", "bar")
Dependencies:
Browser support
Tested on all major browsers.
 |  |  |  |  |  |
---|
Latest ✓ | Latest ✓ | Latest ✓ | Latest ✓ | >=10 ✓ | Latest ✓ |
As a jQuery plugin, you also need to see the jQuery Browser Support.
Contributing
See Contribution.md.
Changelog
To see the list of recent changes, see Releases section.
Version
Version: 0.0.1
Copyright and license
Copyright (C) 2017 Creation Studio Limited.
Licensed under the GPL-v3 license.